﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public enum GameLayer
{
    Default = 0,
    PlayerCamera = 12,
    //UI中显示3D对象
    UICamera = 5,
    //2D UI层
    Npc = 13,
    //所有玩家和怪物所在层
    Light = 11,
    //场景灯光元素所在层
    Light2 = 8,
    //不小心将粒子的光照设置到了这层
    SceneProps = 14,
    //场景物件所在层 用于物理检测何时显示场景物件
    IgnoreCollision = 15,
    //NPC所在层,避免和玩家碰撞 避免碰撞技能所在层
    IgnoreCollision2 = 16,
    //buff 状态下不发生碰撞但是收到技能伤害
    Block = 17,
    //阻挡爆炸发生的层
    Bomb = 18, //炸弹所在层 炸弹之间没有碰撞

    SkillLight = 19,//测试用技能光效
    ShadowMap = 20,//绘制角色阴影
    MotionBlur = 21, //运动模糊层
    TankPass = 22, //坦克可以通过 子弹不能通过
}

public static class Util {
  
    /// <summary>
    /// 所有Unity坐标*100 返回给服务器
    /// </summary>
    /// <param name="pos"></param>
    /// <returns></returns>
    public static int[] ConvertPos(Vector3 pos)
    {
        var ret = new int[3];
        ret[0] = (int)(pos.x * 100);
        ret[1] = (int)(pos.y * 100);
        ret[2] = (int)(pos.z * 100);
        return ret;
    }
}
